﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QLTV.Forms.KhaiBao
{
    public partial class frmSchool : DevExpress.XtraEditors.XtraForm
    {
        public frmSchool()
        {
            InitializeComponent();
            statusDataBar1.addTextChange(viewSchool);
            
        }

        private void frmSchool_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dsCrew.tblSchoolName' table. You can move, or remove it, as needed.
            this.tblSchoolNameTableAdapter.Fill(this.dsCrew.tblSchoolName);

        }

        private void frmSchool_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.End)
            {
                tblSchoolNameBindingSource.EndEdit();
            }
        }

        private void statusDataBar1_DeleteClick(object sender, StatusDataBar.StatusDataBarArgs e)
        {
            tblSchoolNameBindingSource.RemoveCurrent();
            tblSchoolNameBindingSource.EndEdit();
            tblSchoolNameTableAdapter.Update(dsCrew.tblSchoolName);
        }

        private void statusDataBar1_UpdateClick(object sender, StatusDataBar.StatusDataBarArgs e)
        {
            tblSchoolNameBindingSource.EndEdit();
            tblSchoolNameTableAdapter.Update(dsCrew.tblSchoolName);
        }
    }
}